package com.atguigu.tv;

import com.atguigu.Command;

/**
 * @author li.chunlong lcl253-137@alibaba-inc.com
 * @desc ConcreteCommand角色
 * @date 2021-08-20
 */
public class TVOffCommand implements Command {

    private TVReceiver tvReceiver;

    public TVOffCommand(TVReceiver receiver) {
        this.tvReceiver = receiver;
    }

    @Override
    public void execute() {
        tvReceiver.off();
    }

    @Override
    public void undo() {
        tvReceiver.on();
    }
}
